﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using Model;

namespace BLL
{
    public  class MemberManage
    {
        public ArrayList GetMembersByCondition(string sql)
        {
            try
            {
                MemberService memberdal = new MemberService();
                return memberdal.GetMembersByCondition(sql);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }
        }
        public ArrayList GetAllMember(int clubid)
        {
            try
            {
                MemberService memberdal = new MemberService();
                return memberdal.GetAllMember(clubid);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }
        }
        public bool AddMember(ClubMember member)
        {
            try
            {
                MemberService memberdal = new MemberService();
                return memberdal.AddMember(member);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }

        }
        public bool DeleteMember(ClubMember member)
        {
            try
            {
                MemberService memberdal = new MemberService();
                return memberdal.DeleteMember(member);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }

        }


        public bool UpdateMember(ClubMember member)
        {
            try
            {
                MemberService memberdal = new MemberService();
                return memberdal.UpdateMember(member);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }

        }


    }
}
